#ifndef _TASK_MANAGER_H_
#define _TASK_MANAGER_H_

#include <stdint.h>
#include <stdbool.h>
#include <atomic.h>
#include <appConfig.h>

/*! The list of task IDs. The IDs are sorted according to descending
priority. For each task ID there is the corresponding task handler function. */
typedef enum
{
  TASK_ID_SOFT_TIMER = 0,    //!< Task ID of Software Global timer
  TASK_ID_LINS,                 //!< Task ID of LIN slave
#if LIN_MASTER_EN == 1
  TASK_ID_LINM,                 //!< Task ID of LIN master
#endif
  TASK_ID_ADC,                  //!< Task ID of ADC
  TASK_ID_COLOR_MIXING,         //!< Task ID of colorMixing
  TASK_ID_APPL,                 //!< Task ID of APPlication
} TM_TaskId_t;

typedef enum{
  TASK_STATE_INIT = 0,
  TASK_STATE_ACTIVE,
  TASK_STATE_IDLE,
}TaskState_t;




extern void ADC_TaskHandler(void);
extern void LINS_TaskHandler(void);
extern void LINM_TaskHandler(void);
extern void SoftTimer_TaskHandler(void);
extern void CLM_TaskHandler(void);
extern void APPL_TaskHandler(void);

void TM_RunTasks(void);
void TM_PostTask(TM_TaskId_t taskId);























#endif